@import "button";

@import "variable";

.iconinput {
  width: 100%;
  position: relative;

  input {
    width: 100%;
  }

  .floatleft {
    position: absolute;
    left: 0;
  }

  .floatright {
    position: absolute;
    right: 0;
  }
}

/*toggle */
.lcs_switch {
  display: inline-block;
  position: relative;
  width: 73px;
  height: 28px;
  border-radius: 30px;
  background: #ddd;
  overflow: hidden;
  cursor: pointer;
  -webkit-transition: all .2s ease-in-out;
  -ms-transition: all .2s ease-in-out;
  transition: all .2s ease-in-out;

  .lcs_cursor {
    display: inline-block;
    position: absolute;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 100%;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.1);
    z-index: 10;
    -webkit-transition: all .2s linear;
    -ms-transition: all .2s linear;
    transition: all .2s linear;
  }

  .lcs_label {
    font-family: "Trebuchet MS", Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 18px;
    color: #fff;
    font-weight: bold;
    position: absolute;
    width: 33px;
    top: 5px;
    overflow: hidden;
    text-align: center;
    display: none;
    -webkit-transition: all .2s ease-in-out .1s;
    -ms-transition: all .2s ease-in-out .1s;
    transition: all .2s ease-in-out .1s;
    &.lcs_label_on {
      left: -35px;
      z-index: 6;
    }

    &.lcs_label_off {
      right: -35px;
      z-index: 5;
    }
  }

  /* on */
  &.lcs_on {
    background: $color_primary;
    box-shadow: 0 0 2px darken($color_primary,10%) inset;

    .lcs_cursor {
      left: 48px;
    }

    .lcs_label_on {
      left: 10px;
      display: block;
    }
  }

  /* off */
  &.lcs_off {
    background: $color_gray;
    box-shadow: 0px 0px 2px darken($color_gray,10%) inset;

    .lcs_cursor {
      left: 3px;
    }

    .lcs_label_off {
      right: 10px;
      display: block;
    }
  }

  /* disabled */
  &.lcs_disabled {
    opacity: 0.65;
    filter: alpha(opacity = 65);
    cursor: default;
  }
}
